<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>人物管理系统</title>
		<link th:href="@{/css/bootstrap.css}" rel="stylesheet" type="text/css" />
		<script type="text/javascript" th:src="@{/webjars/jquery/3.2.1/jquery.min.js}"></script>
		<script type="text/javascript" th:src="@{/js/bootstrap.min.js}"></script>
		<script th:inline="javascript">
			$(function(){
				alertMSG();
			})
			function alertMSG(){
			    var msg = [[${MSG}]];
			    if(msg!=null){
			    	 alert(msg);
			    }
			}
        </script>
</head>
<body>
<div class="container-fluid">
	<div class="row">
		<div class="col-sm-12">
			<form class="form-horizontal" th:action="@{/power}" th:object="${power}" method="post">  	
  				<input type="hidden" name="id" id="id" th:value="*{id}"/>	
		  		<div class="form-group">
				    <label class="col-sm-2 control-label">权限编码(<font color="red">*</font>):</label>
				    <div class="col-sm-6">
	   					<input class="form-control" type="text" id="powername" name="powername" th:value="*{powername}"  maxlength="50"/>
   						说明：功能权限必须命名为"ROLE_功能名称"格式。
			    	</div>
			    	<div class="col-sm-4" style="color:red"  th:errors="*{powername}"></div>
		    	</div>
		  		<div class="form-group">
				    <label class="col-sm-2 control-label">权限描述(<font color="red">*</font>):</label>
				    <div class="col-sm-6">
	   					<input class="form-control" type="text" id="memo" name="memo" th:value="*{memo}" />
			    	</div>
			    	<div class="col-sm-4" style="color:red"  th:errors="*{memo}"></div>
		    	</div>
		  		<div class="form-group">
				    <label class="col-sm-2 control-label">权限优先级(<font color="red">*</font>):</label>
				    <div class="col-sm-6">
	   					<input class="form-control" type="text" id="rank" name="rank" th:value="*{rank}"  /> 说明：值为数字类型，例如：1、2、3、10、100，值越小优先级越高。
			    	</div>
			    	<div class="col-sm-4" style="color:red"  th:errors="*{rank}"></div>
		    	</div>
		  		<div class="form-group">
				    <label class="col-sm-2 control-label" >权限对应的url(<font color="red">*</font>):</label>
				    <div class="col-sm-6">
	           			<input class="form-control" type="text" id="powerurl" name="powerurl" th:value="*{powerurl}"  />
				  		说明：如果填写权限url，则用户角色包含该权限时，才能访问此url。
			    	</div>
			    	<div class="col-sm-4" style="color:red"  th:errors="*{powerurl}"></div>
		    	</div>
			  	<div class="form-group" style="text-align:center">
				    <label class="col-sm-2 control-label"></label>
				    <div class="col-sm-6">
				   		<button type="submit" class="btn btn-success  btn-sm"  style="width:80px" >确定</button> &nbsp; &nbsp;
						<button type="button" class="btn btn-default  btn-sm"  style="width:80px" onclick="history.go(-1)" >返回列表</button>
			    	</div>
		    	</div>
			</form>
		</div>
	</div>
</div>
</body>
</html>